package cn.edu.xmu.javaee.productdemomybatis.config;

import cn.edu.xmu.javaee.productdemomybatis.dao.MybatisProductDao;
import cn.edu.xmu.javaee.productdemomybatis.mapper.manual.ProductMyBatisMapper;
import cn.edu.xmu.javaee.productdemomybatis.mapper.manual.ProductSQLMapper;
import cn.edu.xmu.javaee.productdemomybatis.util.RequestVariables;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class BeanConfig {

    @Bean
    MybatisProductDao mybatis(ProductMyBatisMapper productMapper){
        return new MybatisProductDao(productMapper);
    }

    @Bean
    MybatisProductDao sql(ProductSQLMapper productMapper){
        return new MybatisProductDao(productMapper);
    }
}
